<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                template="/template/StakeholderTTATemplate.xhtml">

    <ui:define name="contentInsert">
        <c:if test="#{checkBIPaymentMB.checkIsPaid()}">
            <h:form>
                <h:outputText style="color: #D20005; font-family: verdana; font-weight: bold;
                              font-size: small;"
                              value="Customer value is calculated using this function: "/> <br/>
                <p:graphicImage value="/ttaImage/value.PNG" style="height:45px; width:200px"/> <br/>
                <h:outputText style="font-family: sant-serif; font-size: small"
                              value="Customer value is calculated is dependent on customer expenditure and visiting frequency."/> <br/>
                <br/>
                <hr/>

                <h:panelGrid columns="3">
                    <h:outputText value="     ACSR(Average customer spending per reservation):"/>
                    <p:inputText value="#{stakeholderCustAnalysisMB.avgExp_CustValue}" />
                    <p:commandButton value="Enter" update="valueTable" />
                    <h:outputText/>
                </h:panelGrid>
                <p:dataTable id="valueTable" value="#{stakeholderCustAnalysisMB.sortedLocalCustValue}" var="cust"
                             emptyMessage="there are no local customers exist for this stakeholder..."
                             rows="30" paginator="true">
                    <p:column headerText="Level"> 
                        #{cust.rank}
                    </p:column>
                    <p:column headerText="CustomerID">
                        #{cust.customerId}
                    </p:column>
                    <p:column headerText="CustomerEmail">
                        #{cust.customerEmail}
                    </p:column>
                    <p:column headerText="Value Index">
                        #{cust.custValueStr}
                    </p:column>
                </p:dataTable>
            </h:form>
        </c:if>
    </ui:define>
</ui:composition>